home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / pvm34b3.zip / pvm34b3 / pvm3 / libfpvm / WIN32 / Pvmfdelhost.c < prev    next >
C/C++ Source or Header  |  1997-07-22  |  846b  |  48 lines

  1.  
  2. /* $Id: Pvmfdelhost.c,v 1.1 1997/06/27 16:22:36 pvmsrc Exp $ */
  3.  
  4. #ifdef WIN32
  5. #include "..\..\include\pvm3.h"
  6. #include "..\..\src\pvmwin.h"
  7. #else 
  8. #include "pvm3.h"
  9. #endif
  10.  
  11. #include "pvm_consts.h"
  12.  
  13. #ifdef __WATCOMC__
  14. #include "watforstr.h"
  15. void __fortran
  16. PVMDELHOST (host_str, info)
  17. WatcomFortranStr* host_str;
  18. int *info;
  19. {
  20.    char* host_ptr = host_str->strP;
  21.    int   host_len = host_str->len;
  22. #else
  23. void __stdcall
  24. PVMDELHOST (host_ptr,host_len, info)
  25. char * host_ptr; int host_len;
  26. int *info;
  27. {
  28. #endif
  29.    
  30.    char thost[MAX_HOST_NAME + 1];
  31.    char *ptr = thost;
  32.    int cc;
  33.  
  34.    /*
  35.     * Copy the host name to make sure there's
  36.     * a NUL at the end.
  37.     */
  38.    if (ftocstr(thost, sizeof(thost), host_ptr, host_len)) {
  39.       *info = PvmBadParam;
  40.       return;
  41.    }
  42.  
  43.    *info = pvm_delhosts(&ptr, 1, &cc);
  44.    if (*info >= 0)
  45.       *info = cc;
  46. }
  47.  
  48.